//
//  Person.m
//  NSTimer计时器
//
//  Created by mir_yan on 2018/10/1.
//  Copyright © 2018年 hakeem. All rights reserved.
//

/**
 NSTimer 必须运行在NSRunLoop 上
 */
#import "Person.h"

@implementation Person

- (void)openTime {
    [NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(doAction:) userInfo:nil repeats:NO];
    
    [[NSRunLoop mainRunLoop] run];
}

- (void)doAction:(NSTimer*)timer {
    NSLog(@"do Action");
}

@end
